from django.urls import path, re_path
# from django.contrib.staticfiles import views
from user.views import user, user_manage, initialize

app_name = 'user'

urlpatterns = [
    path('register/', user.user_register_view, name='register'),  # POST注册
    path('login/', user.user_login_view, name='login'),  # POST登陆，传递token、menu、头像
    path('logout/', user.user_logout_view, name='logout'),  # GET登出
    path('delete/', user.user_delete_view),  # POST删除
    path('change/', user.user_change_user),   # POST修改用户信息POST
    path('change_password/', user.user_change_password),  # POST改密码POST
    path('reset_password/', user.user_reset_password),  # POST重置密码POST
    path('upload_image/', user.user_upload_image),  # POST上传头像，并返回新头像

    path('search_data/', user_manage.user_search_data),  # GET用户数据查询并分页
    path('excel_download/', user_manage.user_excel_download),  # GET: 用户信息下载
    path('group_name_data/', user_manage.user_group_name),  # GET:角色group下拉框
    path('status_name_change/', user_manage.user_status_change),  # GET:状态【启用/禁用】按钮

    path('init_data/', initialize.init_data3, name='init')  # 初始化信息接口
]